<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
    
        <h:panelGrid columns="2" columnClasses="cols,cols" width="400">
            <rich:panelMenu style="width:200px" itemMode="ajax" groupMode="ajax" groupExpandedLeftIcon="triangleUp"
                			groupCollapsedLeftIcon="triangleDown" topGroupExpandedRightIcon="chevronUp"
                			topGroupCollapsedRightIcon="chevronDown" itemLeftIcon="disc" >
                
                <rich:panelMenuGroup label="AMMINISTRAZIONE">
                
                  	<rich:panelMenuItem label="Clienti" name="Clienti"  
                  						action="#{tabsBean.creaTabRisultatiNew('tabClienti','/pages/Clienti/pannelloRisultatiClienti.xhtml')}" 
                  						actionListener="#{selectBean.findAllRegioni}" 
                  						render="tabsPanel formtabClienti tabellaClienti" rendered="#{rich:isUserInRole('Admin')}"    />
                  	
             
               		<rich:panelMenuItem label="Famiglie" name="Famiglie"  
               							action="#{tabsBean.creaTabRisultatiNew('tabFamiglie','/pages/Famiglie/pannelloRisultatiFamiglie.xhtml')}" 
               							render="tabsPanel formtabFamiglie" rendered="#{rich:isUserInRole('Admin')}" />
               											
         			<rich:panelMenuItem label="Categorie" name="Categorie"  
         								action="#{tabsBean.creaTabRisultatiNew('tabCategorie','/pages/Categorie/pannelloRisultatiCategorie.xhtml')}" 
         								actionListener="#{selectBean.selectFamiglie}" render="tabsPanel formtabCategorie" rendered="#{rich:isUserInRole('Admin')}" />
         																						
         			<rich:panelMenuItem label="Prodotti" name="Prodotti" 
         								action="#{tabsBean.creaTabRisultatiNew('tabProdotti','/pages/Prodotti/pannelloRisultatiProdotti.xhtml')}" 
         								actionListener="#{selectBean.selectCategorie}" render="tabsPanel formtabProdotti" rendered="#{rich:isUserInRole('Admin')}" />
         								
         			<rich:panelMenuItem label="Crea Ordine" name="Crea Ordine"  
         								action="#{tabsBean.creaTabRisultatiNew('tabOrdine','/pages/Ordini/pannelloRisultatiOrdine.xhtml')}" 
         								render="tabsPanel formtabOrdine" rendered="#{rich:isUserInRole('Admin,Segreteria')}" limitRender="true"/>
         								
         								
         			<rich:panelMenuItem label="Crea Fattura" name="Crea Fattura"  
         								action="#{tabsBean.creaTabRisultatiNew('tabFattura','/pages/Fatture/pannelloRisultatiFattura.xhtml')}" 
         								render="tabsPanel formtabFattura" rendered="#{rich:isUserInRole('Admin,Segreteria')}" />
         				
         		</rich:panelMenuGroup>
         		
         		<rich:panelMenuGroup label="STAMPE" rendered="#{rich:isUserInRole('Admin')}">
         			<ui:remove>
         			 <rich:panelMenuItem label="ListaClienti" name="ListaClienti"  action="#{clienteController.stampaPdf()}" mode="server"  />     	
         			 <rich:panelMenuItem label="ListaFamiglie" name="ListaFamiglie"  action="#{clienteController.stampaFamiglieCategorie()}" mode="server"  /> 
         			</ui:remove>
         		</rich:panelMenuGroup>
         		
         		<rich:panelMenuGroup label="RICERCHE" >
         			
         			<rich:panelMenuItem label="Venduto" name="Venduto"  limitRender="true"
         								render="tabsPanel formtabRiepilogoVenduto" action="#{tabsBean.creaTabRiepilogo('tabRiepilogoVenduto','/pages/Prodotti/pannelloRiepilogoProdotti.xhtml')}"  
         								rendered="#{rich:isUserInRole('Admin,Segreteria')}" />
         			
         			
         			<rich:panelMenuItem label="Ordinato" name="Ordinato"  render="tabsPanel formtabRiepilogoOrdinato" limitRender="true"
         								action="#{tabsBean.creaTabRiepilogo('tabRiepilogoOrdinato','/pages/Ordini/pannelloRicercaOrdini.xhtml')}"   />
         								
         			<rich:panelMenuItem label="Fatturato" name="Fatturato"  render="tabsPanel formtabRiepilogoFatturato" limitRender="true"
         								action="#{tabsBean.creaTabRiepilogo('tabRiepilogoFatturato','/pages/Fatture/pannelloRicercaFatture.xhtml')}"    />
         			
         		</rich:panelMenuGroup>
         		
         		
            </rich:panelMenu>
           
             
              
        </h:panelGrid>
        
  


</ui:composition>